import serves from './axios'
import store from '@/store/index'

// 首页虚拟仿真

// 获取首页虚拟仿真列表 
export function getSimulationList() {
    return serves({
        url: '/admin/getSimulationList',
        method: 'post',
        data: {
            token: store.state.token
        }
    })
}

// 添加首页虚拟仿真
export function addSimulation(data) {
    return serves({
        url: '/admin/addSimulation',
        method: 'post',
        data: {
            token: store.state.token,
            ...data
        }
    })
}

// 删除首页虚拟仿真
export function delSimulation(id) {
    return serves({
        url: '/admin/delSimulation',
        method: 'post',
        data: {
            token: store.state.token,
            id
        }
    })
}

// 修改首页虚拟仿真
export function updateSimulation(data) {
    return serves({
        url: '/admin/updateSimulation',
        method: 'post',
        data: {
            token: store.state.token,
            ...data
        }
    })
}

// 获取首页虚拟仿真详情
export function getSimulationInfo(id) {
    return serves({
        url: '/admin/getSimulationInfo',
        method: 'post',
        data: {
            token: store.state.token,
            id
        }
    })
}